var mad_host="http://track.send.microad.jp";
if(document.location.protocol=="https:"){
	mad_host="https://send.microad.jp";
}
var var_client_id='';
if (typeof(mad_client_id) != 'undefined') {
	var_client_id="&clientid="+mad_client_id;
}

var var_group_id='';
if (typeof(mad_group_id) != 'undefined') {
	var_group_id="&group="+mad_group_id;
}

var var_partner_id='';
if (typeof(mad_partner_id) != 'undefined') {
	var_partner_id="&partnerid="+mad_partner_id;
}

var var_user_key='';
if (typeof(mad_user_key) != 'undefined') {
	var_user_key="&userkey="+mad_user_key;
}

var var_demographics='';
if (typeof(mad_demographics) != 'undefined') {
	var_demographics="&demographics="+mad_demographics;
}

var var_attributes='';
if (typeof(mad_attributes) != 'undefined') {
	var_attributes="&attributes="+mad_attributes;
}

var encode_url="prereferrer="+escape(document.referrer);
var mad_query=encode_url+var_client_id+var_group_id+var_partner_id+var_user_key+var_demographics+var_attributes;

var mad_url=mad_host+"/track.cgi?"+mad_query;
var mad_target=new Image();
mad_target.src=mad_url;

